AxiosEngine-old 

AxiosEngine-old Commit Details


Date:2013-01-02 17:45:00 (11 years 11 months ago)
Author:Natalie Adams
Branch:default
Commit:5f8d2fb0abeb
Parents: ac75dc03ed16
Message:Adding MouseAimVector to AGS

Removing Camera extension
Changes:
Daxios/Engine/Extensions/Camera.cs (full)
Maxios/Axios_settings.cs (1 diff)
Maxios/Engine/AxiosGameScreen.cs (2 diffs)

File differences

axios/Axios_settings.cs
117117
118118
119119
120
120121
121122
122123
* - Adding AddScreen method to ScreenManager to make the PlayerIndex optional (default of PlayerIndex.One)
* - Adding visible flag to DrawableAxiosGameObject and SimpleDrawableAxiosGameObject
* - Adding extension to mousestate (Position) to get a Vector2 object of the position
* - Added MouseAimVector to AGS - this allows you to get a vector to "shoot" with (realtive to the mouse and another object) a LinearVelocity in Farseer
*
*/
#endregion
axios/Engine/AxiosGameScreen.cs
1111
1212
1313
14
1415
16
1517
1618
1719
......
6668
6769
6870
71
72
73
74
75
76
77
78
6979
7080
7181
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using GameStateManagement;
using Microsoft.Xna.Framework.Input;
using Axios.Engine.Gleed2D;
using Axios.Engine.Extensions;
namespace Axios.Engine
{
}
public Vector2 MouseAimVector(MouseState ms, Vector2 relativeposition)
{
Vector2 ret;
ret = this.Camera.ConvertScreenToWorld(ms.Position()) - relativeposition;
ret.Normalize();
return ret;
}
/*public void AddGameObject<T>(T gameobject)
{
if (gameobject is AxiosGameObject || gameobject is AxiosUIObject)
axios/Engine/Extensions/Camera.cs
1
2
3
4
5
6
7
8
9
10
11
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Axios.Engine.Extensions
{
public static class Camera
{
}
}

Archive Download the corresponding diff file

Page rendered in 0.46765s using 14 queries.